@extends('layouts.app')

@section('content')
    <div class="content">
        <div class="header">
            <ul class="breadcrumb">
                <li><i class="fa fa-fw fa-cog"></i>行政案件</li>
                <li>不合格单位列表</li>
            </ul>
        </div>
        <div class="main-content">
            <div class="btn-toolbar list-toolbar">
               
                <div class="form-all">
                    <table class="table table-form table-striped table-bordered table-condensed">
                        <thead>
                        <tr>
                            <th width="80">序号</th>
                            <th>单位名称</th>
                            <th>提交时间</th>
                            <th>状态</th>
                            
                            <th align="center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                      @foreach ($un as $key=>$v)
                            <tr>
                                  <td>{{ $key+1 }}</td>
                                  <td>{{ $v->name }}</td>
                                  <td>{{ $v->created_at }}</td>

                                   



                                     @if ($v->status === 2)
                                     <td style="color:green;">不合格</td>
                                     @else
                                     <td style="color:red;">合格</td>
                                     @endif

                                     
                                 

                                     <td align="center"><a href="{{url('admin/case/create',$v->id)}}"  class="label label-success tag">录入案件</a>

                                      <a href="{{url('admin/units/edit_jiancha',$v->id)}}"  class="label label-warning tag del" style="background-color:red;">查看不合格信息</a>
                                  


                                     </td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                </div>

                <ul class="pagination pull-right">
                    {{ $un->render() }}
                </ul>
            </div>
        </div>
    </div>

    <script type="text/javascript">
      function check() {
          $('#search_form').submit();
      }

      function load_city_data_from_menu($id){
          $('#dg').datagrid('load',{
              city: $id,
          });
          $("input[name='city']").val($id);
          $("input[name='area']").val('');
          $("input[name='org_id']").val('');
      }

      function load_area_data_from_menu($id){
          $('#dg').datagrid('load',{
              area: $id,
          });
          $("input[name='city']").val('');
          $("input[name='area']").val($id);
          $("input[name='org_id']").val('');
      }
      function load_org_data_from_menu($id){
          $('#dg').datagrid('load',{
              org_id: $id,
          });
          $("input[name='city']").val('');
          $("input[name='area']").val('');
          $("input[name='org_id']").val($id);
      }
  </script>


@stop
